home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 176-200 / disk_197 / stevie / porting.doc < prev    next >
Text File  |  1992-05-06  |  2KB  |  71 lines

  1.  
  2.          Release Notes for STEVIE - Version 3.31B
  3.  
  4.                    Porting
  5.  
  6.              Tony Andrews -  March 6, 1988
  7.             G. R. Walter -  January 6, 1988
  8.  
  9.  
  10.     Porting the editor is a relatively simple task. Most of the
  11. code is pretty machine-independent. For each environment, there is
  12. a file of routines that perform various low-level operations that
  13. tend to vary a lot from one machine to another. Another file contains
  14. the escape sequences to be used for each machine.
  15.  
  16.     The machine-dependent files currently used are:
  17.  
  18. tos.c:     Atari ST - ifdef for either Megamax or Alcyon
  19. tos.h
  20.  
  21. unix.c:     UNIX System V
  22. unix.h
  23.  
  24. os2.c:     Microsoft OS/2
  25. os2.h
  26.  
  27. dos.c:   MS DOS
  28. dos.h
  29.  
  30. amiga.c: Amiga
  31. amiga.h
  32.  
  33. bsd.c:   BSD 4.3 UNIX
  34. bsd.h
  35.  
  36.     Each of these files are around 150 lines long and deal with
  37. low-level issues like character I/O to the terminal, terminal
  38. initialization, cursor addressing, and so on. There are different
  39. tradeoffs to be made depending on the environment. For example, the
  40. UNIX version buffers terminal output because of the relatively high
  41. overhead of system calls. A quick look at the files will make it clear
  42. what needs to be done in a new environment.
  43.  
  44.     Terminal escape sequences are in the file "term.h". These are
  45. defined statically, for the time being. There is some discussion in
  46. term.h regarding which sequences are optional and which are not. The
  47. editor is somewhat flexible in dealing with a lack of terminal
  48. capabilities.
  49.  
  50.     The character set is in the file "charset.c".
  51.  
  52.     Because not all C compilers support command line macro definitions,
  53. the #define's for system-specific macros are placed in the file "env.h".
  54. If you port to a new system, add another line there to define the macro you
  55. choose for your port.
  56.  
  57.     The basic process for doing a new port is:
  58.  
  59.     1. Come up with a macro name to use when ifdef'ing your system-
  60.        specific changes. Add a line to 'env.h' to define
  61.        the macro name you've chosen.
  62.  
  63.     2. Look at amiga.c, bsd.c, unix.c, tos.c, dos.c and os2.c and copy the
  64.        one that comes closest to working on your system. Then modify your
  65.        new file as needed.
  66.  
  67.     3. Look at term.h and edit the file appropriately adding a new
  68.        set of escape sequence definitions for your system.
  69.  
  70.     4. Compiling and debug the editor.
  71.